﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLNHASACH.DTO;
using System.Security.Cryptography;

namespace QLNHASACH
{
    class Utilitiles
    {
        #region ThÔng tin người dùng
        public static NguoiDung User=new NguoiDung();
        #endregion
        //Ham ma hoa mat khau
        public static string MaHoaMD5(string text)
        {
            MD5CryptoServiceProvider _md5Hasher=new MD5CryptoServiceProvider();
            byte[] bs=Encoding.UTF8.GetBytes(text);
            bs = _md5Hasher.ComputeHash(bs);
            StringBuilder s=new StringBuilder();
            foreach (byte b in bs)
            {
                s.Append(b.ToString("x2"));
            }
            return s.ToString();
        }
    }
    
}
